<extend name="Public/common" />
<block name="body">
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3>菜谱管理</h3>
      <ul class="tab-base">
        <li><a href="JavaScript:void(0);" class="current"><span>列表</span></a></li>
        <li><a href="{:U('add')}" ><span>新增</span></a></li>
      </ul>
    </div>
  </div>
  <div class="fixed-empty"></div>
  <form method="get" action="{:U()}" name="form_search">
    <table class="tb-type1 noborder search">
      <tbody>
        <tr>
          <th><label>区域</label></th>
          <td id="area" colspan="8">
            <select class="querySelect" name="area_id">
              <option value="">请选择...</option>
		      <notempty name="area">
		      <volist name="area" id="vo">
              <option <notempty name="get.area_id"><eq name="get.area_id" value="$key">selected='selected'</eq></notempty> value="{$key}">{$vo}</option>
              </volist>
              </notempty>
            </select></td>
          <th><label for="menu_date">菜品日期:</label></th>
          <td>
            <input class="txt date" type="text" value="<notempty name="get.start_date">{$get['start_date']}</notempty>" id="start_date" name="start_date">
             - <input class="txt date" type="text" value="<notempty name="get.end_date">{$get['end_date']}</notempty>" id="end_date" name="end_date">
          </td>
          <td>
          	<a href="javascript:document.form_search.submit();" class="btn-search " title="查询">&nbsp;</a>
 			<if condition="!empty($get)">
            <a href="{:U('index')}" class="btns " title="撤销检索"><span>撤销检索</span></a>
            </if>
          </td>
        </tr>
      </tbody>
    </table>
  </form>
<table class="table tb-type2" id="prompt">
	<tbody>
		<tr class="space odd">
			<th colspan="12"><div class="title"><h5>操作提示</h5><span class="arrow"></span></div></th>
		</tr>
		<tr>
			<td><ul>
				<li>配置每天的菜谱</li>
				</ul></td>
		</tr>
	</tbody>
</table>
	<form method="post" id="form1">
    <table class="table tb-type2">
      <thead>
        <tr class="thead">
          <th class="w24"></th>
          <th class="w108 align-center">菜单日期</th>
          <th>区域名称</th>
          <th class="w200 align-center">操作</th>
        </tr>
      </thead>
      <tbody>
        <notempty name="list">
        <volist name="list" id="vo">
        <tr class="hover">
          <td><input type="checkbox" name='id[]' value="{$vo['menu_id']}" class="checkitem"></td>
          <td class="align-center"><neq name="vo.menu_date" value="0">{:@date('Y-m-d', $vo['menu_date'])}</neq></td>
          <td>{$area[$vo['area_id']]}</td>
          <td class="align-center">
            <a href="{:U('menu_goods/index?menu_id='.$vo['menu_id'])}">管理菜品</a> |
          	<a href="{:U('edit?id='.$vo['menu_id'])}">编辑</a> |
          	<a href="javascript:if(confirm('您确定要删除吗'))window.location = '{:U('delete?id='.$vo['menu_id'])}';">删除</a>
          </td>
        </tr>
        </volist>
        <else />
        <tr class="no_data">
          <td colspan="10">没有符合条件的记录</td>
        </tr>
        </notempty>
      </tbody>
      <tfoot>
        <tr class="tfoot">
        <notempty name="page">
          <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
          <td colspan="16"><label for="checkallBottom">全选</label>
            &nbsp;&nbsp;<a href="JavaScript:void(0);" class="btn" onclick="if(confirm('您确定要删除吗?')){$('#form1').submit();}"><span>删除</span></a>
            <div class="pagination"> {$page} </div></td>
         <else />  
          <td colspan="16"></td>
         </notempty>
        </tr>
      </tfoot>
    </table>
  </form>
</div>
<script type="text/javascript" src="__JS__/jquery-ui/jquery.ui.js"></script>
<script type="text/javascript" src="__JS__/jquery-ui/i18n/zh-CN.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="__JS__/jquery-ui/themes/ui-lightness/jquery.ui.css"  />
<script type="text/javascript">
$(document).ready(function(){
	$('#start_date').datepicker({dateFormat: 'yy-mm-dd'});
    $('#end_date').datepicker({dateFormat: 'yy-mm-dd'});
});
</script>
</block>